package com.house.core.db;

import java.sql.PreparedStatement;
import java.sql.SQLException;

/**
 * 
 * @author SunChong
 */
public abstract class Op {
	public enum OpType{
		update, queryUniq, queryList, queryExist
	}
	private String sql;
	private String shardId;
	private long uid;
	
	public Op(String sql){
		this.sql = sql;
	}
	
	public Op(String sql, long uid){
		this.sql = sql;
		this.uid = uid;
	}
	
	public String getSql() {
		return sql;
	}

	public void setSql(String sql) {
		this.sql = sql;
	}

	public String getShardId() {
		return shardId;
	}

	public void setShardId(String shardId) {
		this.shardId = shardId;
	}
	
	public long getUid() {
		return uid;
	}

	public void setUid(long uid) {
		this.uid = uid;
	}
	public abstract void setParam(PreparedStatement ps) throws SQLException;
	public abstract OpType getOpType();
}
